{"version":3,"file":"oldgrid.min.js","sources":["oldgrid.js"],"names":["BxUniversalGrid","table_id","this","oColsMeta","oColsNames","customNames","columnsSizes","oEditData","oSaveData","oOptions","oVisibleCols","vars","menu","settingsMenu","filterMenu","checkBoxCount","bColsChanged","bViewsChanged","oFilterRows","activeRow","hasActions","editMode","resizeMeta","grid_id","_this","Grid","last_row","InitTable","BX","Main","gridManager","getById","instance","table","getTable","rows","length","cells","i","hasClass","__fixed","inode","findChildByClassName","addClass","removeClass","initResizeMeta","toogleFader","bind","window","delegate","parentNode","getParam","rhook","onbxdragstart","resizeColumnStart","onbxdragstop","resizeColumnStop","onbxdrag","resizeColumn","jsDD","registerObject","registerPinnedTableButtons","getPinHeader","getFixedTable","buttons","findChild","class","forEach","current","addCustomEvent","CheckColumn","name","menuItem","columns","colMenu","GetMenuByItemId","id","bShow","GetItemInfo","ICON","SetItemIcon","getUserOptions","getCurrentOptions","split","type","isArray","isNotEmptyString","some","filter","getContainerId","unshift","tableFade","setColumns","reloadTable","onCustomEvent","getContainer","reinitColumnSize","column","temp","colId","GetColumnId","twidth","offsetWidth","cell","node","style","height","width","clientHeight","setAttribute","fixed","minPx","sizesChanged","getAttribute","expand","reinitResizeMeta","pwidth","clientWidth","saveColumnsSizes","parent","getScrollContainer","scrollLeft","OnRowContext","e","event","phpVars","opt_context_ctrl","ctrlKey","targetElement","target","srcElement","el","tagName","match","oncontextmenu","findParent","col_menu","SEPARATOR","toUpperCase","jsUtils","FindParentObject","PopupHide","className","OnClose","replace","menuItems","util","array_merge","SetItems","BuildItems","arScroll","GetWindowScrollPos","x","clientX","y","clientY","scrollTop","pos","left","right","top","bottom","PopupShow","returnValue","preventDefault","ShowActionMenu","index","row","actionItems","data","items","JSON","parse","ShowMenu","SelectRow","checkbox","span","document","getElementById","selCount","parseInt","innerHTML","shiftKey","tbl","Math","min","rowIndex","max","push","checked","row_checkbox","toString","checkAll","SelectAllRows","EnableActions","form","forms","bEnabled","IsActionEnabled","bEnabledEdit","editButton","deleteButton","apply","disabled","action","bChecked","elAll","SwitchActionButtons","div","FindNextSibling","display","ActionEdit","ids","Array","tr","denyEvent","td","row_id","value","col_id","editable","create","props","appendChild","defaultChecked","options","list_val","selected","text","children","params","size","paddingRight","href","title","mess","calend_title","border","position","src","calendar_image","alt","onclick","field","calendar","bTime","currentTime","server_time","onmouseover","onmouseout","cols","maxlength","maxLength","elements","ActionCancel","allowEvent","toggleCheckboxes","ActionDelete","submit","ForAllClick","confirm","for_all_confirm","Sort","url","by","sort_state","def_order","args","order","bControl","ajax","get","component_path","sessid","Reload","animation","duration","callback","stop","iteration","__animation","step","from","to","steps","unit","round","interval","setInterval","clearInterval","toogleColumnCells","cid","show","fix","content","data_id","j","removeAttribute","SaveColumns","sCols","views","current_view","user_authorized","GRID_ID","setColumnSizes","container","request","Disable","current_url","AJAX_ID","insertToNode","indexOf","onprogress","scrollContainerLeft","onload","location","SetView","view_id","filter_id","saved_filter","func","filters","ApplyFilter","EditCurrentView","ShowSettings","SaveSettings","AddView","random","view","viewsNewView","sort_by","sort_order","page_size","custom_names","columns_sizes","views_list","Option","viewsNoName","EditView","selectedIndex","DeleteView","viewsDelete","remove","bCreated","CDialog","settingsTitle","settingWndSize","resize_id","ClearButtons","SetButtons","settingsSave","parentWindow","Close","prototype","btnCancel","Show","view_name","focus","aVisCols","oVisCols","n","jsSelectUtils","deleteAllOptions","view_all_cols","colName","view_cols","reset_columns_sizes","selectOption","view_sort_by","view_sort_order","view_page_size","view_filters","viewsFilter","set_default_settings","delete_users_settings","up_btn","down_btn","rename_btn","add_btn","del_btn","RenameColumn","renameTitle","renameWndSize","selectedCol","settingsForm","col_name","col_name_def","doReload","getAction","handler","post","ReloadViews","ShowViews","applyBtn","CWindowButton","viewsApply","hint","viewsApplyTitle","viewsTitle","btnClose","viewsWndSize","DragStart","onDragStart","getRows","getHeadChild","getCells","cellPosition","containerPosition","cellLeft","__cursor","settings","__dragNode","createElement","insertBefore","__dragDest","cellIndex","__dragX","start_x","__dragCells","ipos","ref","offset","move","Drag","self","dragX","dragDestNode","destNode","__dest","DragStop","onDragStop","getList","dragCell","destCell","map","currentRow","isHeadChild","isBodyChild","isFootChild","getNode","isDomNode","nextElementSibling","call","getHeadFirstChild","cellsKeys","Object","keys","cellContainer","__overlay","append","__resizeCell","key","firstChild","fixedTable","fixedCell","fixedCellContainer","tpos","cpos","cellAttrWidth","parseFloat","sX","setTimeout","InitFilter","addEvent","SwitchFilterRow","mnu","MENU","ID","ICONCLASS","a","SwitchFilter","SaveFilterRows","SwitchFilterRows","on","sRows","filterShow","filterHide","ClearFilter","toLowerCase","l","onchange","clear_filter","ShowFilters","filtersApply","filtersApplyTitle","filters_list","filtersTitle","filtersWndSize","AddFilter","fields","filtersNew","ShowFilterSettings","SaveFilter","insertIntoArray","mnuItem","TEXT","htmlspecialchars","TITLE","ApplyTitle","ONCLICK","AddFilterAs","GetFilterFields","EditFilter","DeleteFilter","filtersDelete","deleteFromArray","filterSettingsTitle","filterSettingWndSize","filter_name","SetFilterFields","val","substr","bWasSelected","sel","OnDateChange","bShowFrom","bShowTo","bShowHellip","bShowDays","bShowBr","findNextSibling","tag","loadColumn","colHead","results","json","edit","widthFrom","widthTo","cellProps","Enable","method","dataType","headers","GRID_AJAX_UID","stringify","onsuccess","onfailure","getData","processData","scriptsRunFirst"],"mappings":"AACA,QAASA,iBAAgBC,GAExB,YAEAC,MAAKC,YACLD,MAAKE,aACLF,MAAKG,cACLH,MAAKI,eACLJ,MAAKK,YACLL,MAAKM,YACLN,MAAKO,WACLP,MAAKQ,eACLR,MAAKS,OACLT,MAAKU,KAAO,IACZV,MAAKW,eACLX,MAAKY,aACLZ,MAAKa,cAAgB,CACrBb,MAAKc,aAAe,KACpBd,MAAKe,cAAgB,KACrBf,MAAKgB,cACLhB,MAAKiB,UAAY,IACjBjB,MAAKkB,WAAa,KAClBlB,MAAKmB,SAAW,KAChBnB,MAAKoB,aACLpB,MAAKD,SAAWA,EAAW,QAC3BC,MAAKqB,Q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